/* Copyright (c) 2025 Beijing Semidrive Technology Corporation
 * SPDX-License-Identifier: Apache-2.0
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/** *****************************************************************************************************
 *  \file     Sent_Cfg.h                                                                                *
 *  \brief    This file contains interface header for SENT MCAL config                                  *
 *                                                                                                      *
 * <table>                                                                                              *
 * <tr><th>Date                    <th>Version                                                          *
 * <tr><td>2025-03-25 19:03:22     <td>1.0.0 R                                                          *
 * </table>                                                                                             *
 *******************************************************************************************************/
#ifndef SENT_CFG_H
#define SENT_CFG_H
/********************************************************************************************************
 *                                      Include header files                                            *
 *******************************************************************************************************/
#include "Sent_Types.h"
 /**
 *  \addtogroup SENT_MACRO SENT macro
 *  \{
 */
/********************************************************************************************************
 *                                 Global Macro definition                                              *
 *******************************************************************************************************/
 /**
 *  \name SENT software version macro
 *  \{
 */
/* autosar version information */
/** \brief  SENT driver autosar major version */
#define SENT_AR_RELEASE_MAJOR_VERSION      (0x04U)
/** \brief  SENT driver autosar minor version */
#define SENT_AR_RELEASE_MINOR_VERSION      (0x03U)
/** \brief  SENT driver autosar revision version */
#define SENT_AR_RELEASE_REVISION_VERSION   (0x01U)
/* semidrive driver information */
/** \brief  SENT driver vendor major version */
#define SENT_SW_MAJOR_VERSION              (0x03U)
/** \brief  SENT driver vendor minor version */
#define SENT_SW_MINOR_VERSION              (0x01U)
/** \brief  SENT driver vendor patch version */
#define SENT_SW_PATCH_VERSION              (0x00U)
/** \} */

 /**
 *  \name SENT service enable/diable defines
 *
 *  Pre-compile switches for enabling/disabling SENT MCAL APIs
 *  \{
 */
/** \brief Enable/Disable safety */
#define SENT_SAFETY_ENABLE   (STD_ON)
/** \brief Enable/Disable DET error detection */
#define SENT_DEV_ERROR_DETECT   (STD_ON)
/** \brief Enable/Disable Sent_GetVersionInfo() */
#define SENT_VERSION_INFO_API   (STD_ON)
/** \brief Enable/Disable time stamp function */
#define SENT_TIME_STAMP_FUNCTION    (STD_ON)
#define SENT_DMA_NO_CACHE_MAINTAIN    (STD_OFF)
/** \} */

 /**
 *  \name SENT time stamp channel
 *
 *  time stamp channel name macro define
 *  \{
 */
/** \brief Shorter Symbolic name for SENT time stamp channel #0 SentConfigSet_0 */
#define SentConf_SentConfigSet_SentConfigSet_0 ((Sent_TimeStampChannelType)0)
/** \} */

 /**
 *  \name SENT channel
 *
 *  sent channel name macro define
 *  \{
 */
/** \brief Shorter Symbolic name for SENT time stamp channel #0 SentChannelConfigSet_0 */
#define SentConf_SentChannelConfigSet_SentChannelConfigSet_0 ((Sent_ChannelType)0)
/** \brief Shorter Symbolic name for SENT time stamp channel #1 SentChannelConfigSet_1 */
#define SentConf_SentChannelConfigSet_SentChannelConfigSet_1 ((Sent_ChannelType)1)
/** \} */
/** \} */

/********************************************************************************************************
 *                                 Private Macro definition                                             *
 *******************************************************************************************************/
/** \brief SENT core0 enable/disable */
#define SENT_CORE0_ENABLE STD_ON
/** \brief SENT core1 enable/disable */
#define SENT_CORE1_ENABLE STD_OFF
/** \brief SENT core2 enable/disable */
#define SENT_CORE2_ENABLE STD_OFF
/** \brief SENT core3 enable/disable */
#define SENT_CORE3_ENABLE STD_OFF
/** \brief SENT core4 enable/disable */
#define SENT_CORE4_ENABLE STD_OFF

/** \brief  SENT time stamp config channel num */
#define SENT_TIME_STAMP_NUM (1UL)
/** \brief  SENT config channel num */
#define SENT_CHANNEL_NUM (2UL)

/** \brief Sent dma irq water level num 0 */
#define SENT_DMA_IRQ_WATER_LEVEL_CORE0 (0UL)
/** \brief Sent dma irq water level num 0 */
#define SENT_DMA_IRQ_WATER_LEVEL_CORE1 (0UL)
/** \brief Sent dma irq water level num 0 */
#define SENT_DMA_IRQ_WATER_LEVEL_CORE2 (0UL)
/** \brief Sent dma irq water level num 0 */
#define SENT_DMA_IRQ_WATER_LEVEL_CORE3 (0UL)

/** \brief DMA water level */
#if (SENT_DMA_IRQ_WATER_LEVEL_CORE0 > 0UL) || (SENT_DMA_IRQ_WATER_LEVEL_CORE1 > 0UL) || (SENT_DMA_IRQ_WATER_LEVEL_CORE2 > 0UL) || (SENT_DMA_IRQ_WATER_LEVEL_CORE3 > 0UL)
#define SENT_DMA_WATER_LEVEL (STD_ON)
#else
#define SENT_DMA_WATER_LEVEL (STD_OFF)
#endif
/** #if (SENT_DMA_IRQ_WATER_LEVEL_CORE0 > 0UL) || (SENT_DMA_IRQ_WATER_LEVEL_CORE1 > 0UL) || (SENT_DMA_IRQ_WATER_LEVEL_CORE2 > 0UL) || (SENT_DMA_IRQ_WATER_LEVEL_CORE3 > 0UL) */

/********************************************************************************************************
 *                                  Global Constant Declarations                                        *
 *******************************************************************************************************/
/** \brief  SENT time stamp config generate */
extern const Sent_TimeStampCfgType Sent_TimeStampCfg[SENT_TIME_STAMP_NUM];
/** \brief  SENT config generate */
extern const Sent_ChannelCfgType Sent_ChannelCfg[SENT_CHANNEL_NUM];
#endif /* SENT_CFG_H */
/* End of file */
